
var Client = require("./client");
var client = new Client({
    heartbeatInterval: 3 * 60 * 1000, //default
    heartbeatTimeout: 60 * 1000, //default
    heartbeatMaxAttempts: 3, //default
    timeout: 30 * 1000, //default
    port: 17890, //default
    host: "183.230.96.94", //default
    serviceId: "BJQTZX", //default
    feeCode: "1", //default
    srcId: "1064899265087", //default
    mobilesPerSecond: 200 //default
});

client.on("receive", function (mobile, content) {
    console.log("receive", mobile, content);
});
client.on("deliver", function (mobile, stat) {
    console.log("deliver", mobile, stat);
});
client.on("error", function (err) {
    console.log("error", err);
});
client.on("terminated", function () {
    client.connect("265087", "265087");
});

client.connect("265087", "265087").then(() => {
    client.sendGroup(["1064758318062"], "SERVER,1,gpsdev.jimicloud.com,21100,0#").catch((err) => {
        console.log(err);
    });
});